package cn.gzsf.springboot07.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @RequestMapping("/check")
    public String check(String username){
        if("tom".equals(username)){
            return "用户名已注册，不可用";
        }
        return "用户名可用";
    }
    @RequestMapping("/reg")
    public String reg(String username,String password){
        System.out.println("username = " + username + ", password = " + password);
        return "恭喜"+username+"注册成功";
    }
}
